//1、一对相亲数是指：甲的约数之和等于乙，乙的约数之和等于甲。求1000以内的相亲数。
public class Text {
    public static void main(String[] args) {

        for (int i = 1; i <= 1000; i++) {
             int sum1=Xiang(i);
             int sum2=Xiang(sum1);
             if(i>sum1&&i==sum2){
                 System.out.println(sum2+" "+sum1);

             }
        }
    }
    public static int Xiang(int x){
        int sum = 0;
        for (int i = 1; i < x ; i++) {
            if(x%i == 0){
                sum+=i;
            }
        }
        return sum;
    }

}
